properties {
    $buildDir = ".\build"
    $outputDir = "$buildDir\lib\$framework"
    $libs = "packages\Ninject.2.2.1.0\lib\.NetFramework $framework"
}

task default -depends Compile

task Compile -depends Clean,Init { 
    $sources = gci ".\ninject.configurer" -r -fi *.cs |% { $_.FullName }
    $out = $outputDir + "\ninject.configurer.dll"
    csc /target:library /out:$out $sources /lib:$libs /r:Ninject.dll
}

task Init {
    mkdir $outputDir | out-null
}

task Clean { 
    if (test-path $outputDir) { ri -r -fo $outputDir }
}
